 package chapter5;

import java.nio.charset.CoderMalfunctionError;

public class OverLoadRide1 {
	public static void main(String[] args) {
		Child child = new Child();
		child.pee();
	}
}

class Mother {
	void eats() {
		System.out.println("Mother eating!");
	}

	void gases() {
		System.out.println("The Mother of gases!");
	}
	
	//void shits() throws MyException,Error{
	void poops() throws Error{
		System.out.println("Mother poop throws a my exception.");
	}
	void burps(){
		System.out.println("Mother is burping!");
	}
	void pee() {
		System.out.println("Mother is peeing!");
	}
}

class Child extends Mother{
	void eats() {
		System.out.println("Child eats!");
	}

	void gases() {
		System.out.println("Child gases!");
	}
	
	void gases(int z) {
		System.out.println("Child gases! times:" + z);
	}
	
	void poops()throws AssertionError,CoderMalfunctionError{
		System.out.println("Child is poops throws a my oh my exception.");
	}
	//@Override
	void pee() throws Error{
		System.out.println("Child is peeing!");
	}
	
	//static method cannot hide from Mother
	// static void burp(){
	// System.out.println("Mother is burping!");
	// }
}

